<?php !defined('INC') && exit('Load failure!'); ?>
{? $u->auth_group('feedback'); ?}
{#include file='include/top.php'}

<div class="w_960">
	{#include file="block/left.php"}
	
<div class="w_700 fr mb10">

	<div class="nav mb10">
		<strong>当前位置</strong> | <a title="首页" href="{DIR}">首页</a>  |   <a href="javascript:;">留言反馈</a>
	</div>

	<img src="{DIR.T}images/feedback.jpg" width="700" height="220" class="fl" />
	<div class="f_2 fl pa20" style="width:652px;">
			<form method="POST" id="form_publish" class="feedback_form">
				<ul>
					<li><h3 class="must">留言标题:</h3><input class="text" type="text" name="title" maxlength="50" value=""/></li>
					<li><h3 class="must">留言内容:</h3><textarea name="content"></textarea><em>不支持HTML代码</em></li>
					<li><h3 class="must">联系人:</h3><input class="text width200" type="text" name="name" maxlength="20" value="{$u->info[name]}"/></li>
					<li><h3>联系电话:</h3><input class="text width200" type="text" name="tel" maxlength="15" value="{$u->info[tel]}"/></li>
					<li><h3>联系QQ:</h3><input class="text width200" type="text" name="qq" maxlength="12" value="{$u->info[qq]}"/></li>
					<li><h3>电子邮件:</h3><input class="text width200" type="text" name="email" maxlength="50" value="{$u->info[email]}"/></li>
					{#if(!$u->info['islogin'])}<li><h3 class="must">验证码:</h3>{? $checkcode=new checkcode; echo $checkcode->show();?}</li>{#endif}
					<li><h3>&nbsp;</h3><input type="submit" value="提交留言" accesskey="s" class="Submit" onclick="return form_submit()"/><p class="selectbox"><input type="checkbox" id="xieyi" name="xieyi"{#if($u->info['islogin'])} checked="true"{#endif}/><label for="xieyi">我已认真阅读并接受</label><a href="{DIR}?user-license" target="_blank">服务条款</a></p></li>
				</ul>
			</form>
			<script>
			function form_submit() {
				$('.Submit').attr('disabled','true');
				$.kc_ajax({URL:'<?=FULLURL?>apps/feedback/index.php',CMD:'feedback',FORM:'form_publish',METHOD:'POST',op:'1'});
				return false;
			}
			</script>
			<div class="feedback_list">
				{@res.select_join table1='%s_feedback' field1='id,title,content,feedback,date,name' table2='%s_user' field2='username' on='userid' where='t1.status=1' order='t1.id desc' number='10' cache='0'}
				{#foreach($res as $rs)}			
				<div class="feedback_list_item">
					<div class="feedback_list_info">By<span>{#if(!empty($rs['username']))}{$rs[username]}{#else}{$rs[name]}{#endif}：</span>In {$rs[date] date='Y-m-d H:i'}</div>
					<div class="feedback_list_content">{$rs['content'] code='html'}</div>
				</div>
				{#if(!empty($rs['feedback']))}
				<div class="feedback_list_item feedback_list_reply">
					<div class="feedback_list_info">By<strong>管理员</strong><span>回复：</span></div>
					<div class="feedback_list_content">{$rs['feedback'] code='html'}</div>
				</div>
				{#endif}
				{#endforeach}
			</div>
			<div class="page" id="comments_panel">{$res_pagelist code='html'}</div>			
	</div>

	</div>	
</div>	

{#include file='include/bottom.php'}
	
</body>
</html>